package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.CartItemVo;
import com.atguigu.gulimall.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;



/**
 * @author jingchun
 * @create 2024-07-20 22:52
 */
public interface CartService {

	CartItemVo getCartItem(Long skuId);

	CartItemVo addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

	CartVo getCart() throws ExecutionException, InterruptedException;

	List<CartItemVo> getUserCartItems();
	/**
	 * 清空购物车的数据
	 * @param cartKey
	 */
	public void clearCartInfo(String cartKey);

	void checkItem(Long skuId, Integer checke);

	void changeItemCount(Long skuId, Integer num);

	void deleteIdCartInfo(Integer skuId);
}
